package wkt.exam;

import lombok.Data;

import java.util.Map;

@Data
public class WrongStatistics {
    private long totalAnsweredQuestionTimes;
    private long totalAnsweredWrongQuestionTimes;
    private long todayAnsweredWrongQuestionTimes;
    private double totalWrongPercent;
    private Map<String, WrongBookQuestionCount> wrongBookQuestionCount;


    public WrongStatistics(Map<String, WrongBookQuestionCount> wrongBookQuestionCount, long totalAnsweredQuestionTimes, long totalAnsweredWrongQuestionTimes, long todayAnsweredWrongQuestionTimes) {
        this.wrongBookQuestionCount = wrongBookQuestionCount;
        this.totalAnsweredQuestionTimes = totalAnsweredQuestionTimes;
        this.totalAnsweredWrongQuestionTimes = totalAnsweredWrongQuestionTimes;
        this.todayAnsweredWrongQuestionTimes = todayAnsweredWrongQuestionTimes;
        this.totalWrongPercent = Math.round((float) totalAnsweredWrongQuestionTimes / totalAnsweredQuestionTimes * 10000) / 100.0;
    }
}
